home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.3 KB | 69 lines | [TEXT/GEOL] |
- Item 7371757 8-Sept-90 23:01DST
-
- From: UK0392 EHN & DIJ Oakley,IDV
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: ModalDialog problem
-
- Friends,
-
- Just before he went on vacation, Keith Rollin passed on two notes from the
- field, including:
-
- "1) There are two modal dialogs with EditText fields. The field selected upon
- opening the dialogs was locked (would accept no input from the keyboard) and
- required going to another field and then returning to make an entry . This did
- not happen with MA 2.0. The probalem was fixed by placing the
- SelectEditText('name',True); call after, rather than before, opening the window
- containing the dialog."
-
- Now, I have just rebuilt (and started shipping new betas of) all my
- applications using MA2.02, and have found that this problem appears to affect
- *all* such instances of EditText fields which are selected when opening a
- dialog. Now, if the dialog is modeless, you have a minor inconvenience.
- However, if you use the following code, the cookbook way of opening a modal
- dialog, then there appears to be no workaround:
-
- PROCEDURE DoInfo;
- VAR
- aWindow:TWindow;
- aInfoView: TInfoView;
- aView: TView;
- dismisser: IDType;
- BEGIN
- aWindow := NewTemplateWindow(6005, NIL);
- IF aWindow <> NIL THEN
- BEGIN
- aInfoView := TInfoView(aWindow.FindSubView('DLOG'));
- IF aInfoView <> NIL THEN
- BEGIN
- aInfoView.IInfoView(SELF);
- aInfoView.StuffValues;
- aInfoView.SelectEditText('in01', TRUE); {has to go here!!!}
- dismisser := aInfoView.PoseModally;
- fChangeCount := fChangeCount + 1;
- END
- {$IFC qDebug}
- ELSE
- ProgramBreak('MakeTemplateViews: Unable to find view.')
- {$ENDC}
- ;
- aWindow.Close;
- END;
- END;
-
- I have tried a quick (hocus pocus) focus prior to trying SelectEditText, to no
- avail, nor can I see anything obvious in the MacApp 2.02 source. Although I
- will obviously continue to search for a solution (I have one dialog in which
- there is only 1 EditText item, which prevents the user from entering anything
- if I use the above code to try to select it at the opening of the dialog!!),
- all suggestions will be greatly appreciated.
-
- I am sorry if this has already been raised & solved, but I cannot find a recent
- link on it.
-
- Regards,
- Howard.
-
-